package controllers.sensors.implementation.tinkerforge;

import java.util.ArrayList;

import controllers.persist.REMSPersist;
import controllers.sensors.implementation.AbstractSensorController;
import controllers.sensors.interfaces.Sensor;
import controllers.sensors.interfaces.SensorConfig;

public class TFSensorController extends AbstractSensorController {

    ArrayList<Sensor> connectedConnections = new ArrayList<Sensor>();
    private SensorConfig config;

    public TFSensorController(SensorConfig config) {
        this.config = config;
    }

    @Override
    public void connectToAvailableSensors() {
        for (Sensor sensor : config.getSensors()) {
            sensor.connect();
            connectedConnections.add(sensor);
        }
    }

    @Override
    public void disconnectSensors() {
        for (Sensor tfSensor : connectedConnections) {
            tfSensor.disconnect();
        }

    }
}
